home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIShellService.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  117 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is Shell Service.
  16.  *
  17.  * The Initial Developer of the Original Code is mozilla.org.
  18.  * Portions created by the Initial Developer are Copyright (C) 2004
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *  Ben Goodger <ben@mozilla.org>
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. interface nsIDOMElement;
  41.  
  42. [scriptable, uuid(d6f62053-3769-46f6-bd2b-0a1440d6c394)]
  43. interface nsIShellService : nsISupports
  44. {
  45.   /**
  46.    * Determines whether or not Firefox is the "Default Browser."
  47.    * This is simply whether or not Firefox is registered to handle 
  48.    * http links. 
  49.    * 
  50.    * @param aStartupCheck true if this is the check being performed
  51.    *                      by the first browser window at startup, 
  52.    *                      false otherwise. 
  53.    */
  54.   boolean isDefaultBrowser(in boolean aStartupCheck);
  55.  
  56.   /**
  57.    * Registers Firefox as the "Default Browser."
  58.    *
  59.    * @param aClaimAllTypes Register Firefox as the handler for 
  60.    *                       additional protocols (ftp, chrome etc)
  61.    *                       and web documents (.html, .xhtml etc).
  62.    * @param aForAllUsers   Whether or not Firefox should attempt
  63.    *                       to become the default browser for all
  64.    *                       users on a multi-user system. 
  65.    */
  66.   void setDefaultBrowser(in boolean aClaimAllTypes, in boolean aForAllUsers);
  67.  
  68.   /** 
  69.    * Used to determine whether or not to show a "Set Default Browser"
  70.    * query dialog. This attribute is true if the application is starting
  71.    * up and "browser.shell.checkDefaultBrowser" is true, otherwise it
  72.    * is false.
  73.    */
  74.   attribute boolean shouldCheckDefaultBrowser;
  75.  
  76.   /** 
  77.    * Flags for positioning/sizing of the Desktop Background image.
  78.    */
  79.   const long BACKGROUND_TILE      = 1;
  80.   const long BACKGROUND_STRETCH   = 2;
  81.   const long BACKGROUND_CENTER    = 3;
  82.   const long BACKGROUND_FILL      = 4;
  83.  
  84.     /**
  85.      * Sets the desktop background image using either the HTML <IMG> 
  86.      * element supplied or the background image of the element supplied.
  87.      *
  88.      * @param aImageElement Either a HTML <IMG> element or an element with
  89.      *                      a background image from which to source the
  90.      *                      background image. 
  91.      * @param aPosition     How to place the image on the desktop
  92.      */
  93.   void setDesktopBackground(in nsIDOMElement aElement, in long aPosition);
  94.  
  95.   /**
  96.    * Constants identifying applications that can be opened with
  97.    * openApplication.
  98.    */
  99.   const long APPLICATION_MAIL        = 0;
  100.   const long APPLICATION_NEWS        = 1;
  101.  
  102.   /**
  103.    * Opens the application specified. If more than one application of the
  104.    * given type is available on the system, the default or "preferred"
  105.    * application is used. 
  106.    */
  107.   void openApplication(in long aApplication);
  108.  
  109.   /** 
  110.    * The desktop background color, visible when no background image is 
  111.    * used, or if the background image is centered and does not fill the 
  112.    * entire screen. A rgb value, where (r << 16 | g << 8 | b)
  113.    */
  114.   attribute unsigned long desktopBackgroundColor;
  115. };
  116.  
  117.